home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / remote / rafm111.zip / RAFMSTR.DOC < prev    next >
Text File  |  1991-11-17  |  18KB  |  435 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                       RemoteAccess File Manager version 1.11
  7.           ───────────────────────────────────────────────────────────────
  8.  
  9.  
  10.  
  11.           ╒═════════════════════════════════════════════════════════════╕
  12.           │░░░ Introduction ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
  13.           ╘═════════════════════════════════════════════════════════════╛
  14.  
  15.           This  document describes  the structures of  the datafiles used
  16.           by RAFM and how to use them. 
  17.  
  18.           The mentioned Flagtype is an array of 4 bytes, declared as:
  19.  
  20.           Type
  21.  
  22.           FlagType =        Array[1..4] of byte;
  23.  
  24.           ╒═════════════════════════════════════════════════════════════╕
  25.           │░░░ RAFMAREA.DAT ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
  26.           ╘═════════════════════════════════════════════════════════════╛
  27.  
  28.           The  file RAFMAREA.DAT contains  all information about the used
  29.           areas. It  has a fixed  length of 30600  bytes and consists  of
  30.           200 records.
  31.  
  32.           Type
  33.  
  34.           AreaRecord =      Record
  35.                             Name :           String[60];
  36.                             Free :           Boolean;
  37.                             Filepath :       String[50];
  38.                             Security :       Word;
  39.                             Flags :          Flagtype;
  40.                             PrivateSec :     Word;
  41.                             PrivateFlags :   Flagtype;
  42.                             Password :       String[15];
  43.                             Header :         String[8];
  44.                             PassOk :         Boolean;
  45.                             Protected :      Boolean;
  46.                             ProcessArch :    Boolean;
  47.                             End;
  48.  
  49.           Field descriptions:
  50.  
  51.           Name :            The name of this area.
  52.           Free :            If  TRUE, users  can download  all files  for
  53.                             free from this area.
  54.           Filepath :        Directory  where  uploaded files  are stored,
  55.                             when not using the restrict uploads option.
  56.           Security :        Minimum security-level to access this area.
  57.           Flags :           Flags required to access this area.
  58.           PrivateSec :      Minimum  security-level  to  access   private
  59.  
  60.           ───────────────────────────────────────────────────────────────
  61.                                                                   Page: 1
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.                       RemoteAccess File Manager version 1.11
  69.           ───────────────────────────────────────────────────────────────
  70.  
  71.  
  72.                             files in this area.
  73.           PrivateFlags :    Flags  required  to access  private  files in
  74.                             this area.
  75.           Password :        Password protecting this area, blank = none.
  76.           Header :          .A??  file  to   show  before  displaying   a
  77.                             listing of this area, blank = none.
  78.           PassOk :          Set  to  TRUE if  the user  enters  a correct
  79.                             password for  this area.  This is  to prevent
  80.                             that the user has  to type the password  more
  81.                             than once during one session.
  82.           Protected :       If   TRUE,  files   in  this  area   are  not
  83.                             processed by the maintenance option.
  84.           ProcessArch :     If TRUE, files in this area  are converted to
  85.                             the default archive-type by RafmChk.
  86.  
  87.           ╒═════════════════════════════════════════════════════════════╕
  88.           │░░░ RAFMFILE.DAT and RAFMIDX.DAT ░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
  89.           ╘═════════════════════════════════════════════════════════════╛
  90.  
  91.           The  file RafmFile.Dat is  the main  database file and contains
  92.           all information about the  downloadable files on the BBS. Since
  93.           this file can become  quite large, the RAFMIDX.DAT is used  for
  94.           quick access.
  95.  
  96.           Type (*RafmFile.Dat*)
  97.  
  98.           FileDataRecord =  Record
  99.                             Name :           String[12];
  100.                             Path :           String[50];
  101.                             Area :           Byte;
  102.                             DownL :          Word;
  103.                             LastAccess,
  104.                             Date,
  105.                             Size :           Longint;
  106.                             Desc :           String[210];
  107.                             Uploader :       String[35];
  108.                             PassWord :       String[15];
  109.                             Bits,
  110.                             PrevArea :       Byte;
  111.                             End;
  112.  
  113.           Name :            The name of the file, including extension.
  114.           Path :            Full path where the file is located.
  115.           Area :            Number of the area the file is part of.
  116.           DownL :           Number   of   times   the   file   has   been
  117.                             downloaded.
  118.           LastAccess :      Date and time the file was last downloaded.
  119.           Date :            Date and time of the file.
  120.           Size :            The size of the file in bytes.
  121.  
  122.           ───────────────────────────────────────────────────────────────
  123.                                                                   Page: 2
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                       RemoteAccess File Manager version 1.11
  131.           ───────────────────────────────────────────────────────────────
  132.  
  133.  
  134.           Desc :            Description of the file.
  135.           Uploader :        Name of the person who uploaded the file.
  136.           PassWord :        If  not  empty,  users  have  to  enter  this
  137.                             password before they can download the file.
  138.           Bits :            Various statusbits:
  139.  
  140.                             Bitnumber   Meaning
  141.                             0           Free file
  142.                             1           Private file
  143.                             2           Checked (processed by RafmChk)
  144.                             3           Deleted record
  145.                             4           Protected file (not  processed by
  146.                                         the maintenance option)
  147.                             5           User created archive
  148.                             6 and 7     Reserved
  149.           PrevArea :        The area  the file was  located before  being
  150.                             moved by the maintenance option.
  151.  
  152.           The  longints LastAccess and  Date are packed DateTime records.
  153.           Bits 6  and 7  are reserved  for later use,  you shouldn't  use
  154.           them  in your  program. Bit 3  does NOT indicate  that the file
  155.           has been erased from disk. 
  156.  
  157.           Type (*RafmIdx.Dat*)
  158.  
  159.           IdxRecord =       Record
  160.                             Name :           String[12];
  161.                             Area :           Byte;
  162.                             RecNr :          Word;
  163.                             Date :           Longint;
  164.                             end;
  165.  
  166.           Name, Area  and Date are the same  as in RafmFile.Dat. RecNr is
  167.           the   number  of  the  corresponding   record  in  RafmFile.Dat
  168.           (linear, 1-based). 
  169.  
  170.           ╒═════════════════════════════════════════════════════════════╕
  171.           │░░░ RAFMPROT.DAT ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
  172.           ╘═════════════════════════════════════════════════════════════╛
  173.  
  174.           RafmProt.Dat  contains  the  information  about  the   external
  175.           protocols. It has a fixed length of 8575 bytes (25 records).
  176.  
  177.           Type
  178.  
  179.           ProtocolRecord =  Record
  180.                             Kind :                 Byte;
  181.                             Character :            Char;
  182.                             UploadPath,
  183.  
  184.           ───────────────────────────────────────────────────────────────
  185.                                                                   Page: 3
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.                       RemoteAccess File Manager version 1.11
  193.           ───────────────────────────────────────────────────────────────
  194.  
  195.  
  196.                             DownloadPath :         String[80];
  197.                             Efficiency,
  198.                             Maxfiles :             Byte;
  199.                             Desc :                 String[50];
  200.                             Downkeyword,
  201.                             Upkeyword :            String[20];
  202.                             DownCount,
  203.                             DescCount :            Byte;
  204.                             Available :            Boolean;
  205.                             End;
  206.  
  207.  
  208.           Please read Rafm.Doc for  more info about the meaning of  these
  209.           fields. 
  210.  
  211.           ╒═════════════════════════════════════════════════════════════╕
  212.           │░░░ RAFMCONF.DAT ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
  213.           ╘═════════════════════════════════════════════════════════════╛
  214.  
  215.           RafmConf.Dat contains all other information needed by Rafm.
  216.  
  217.           Type
  218.  
  219.           ConfigRecord =    Record
  220.                             ForeGr,
  221.                             BackGr,
  222.                             StatusFore,
  223.                             StatusBack,
  224.                             MHigh,
  225.                             FBack,
  226.                             FName,
  227.                             FDate,
  228.                             FSize,
  229.                             FDesc,
  230.                             FCount,
  231.                             FLast,
  232.                             FArch,
  233.                             MoreC :          Byte;
  234.                             DefaultExt :     String[3];
  235.                             PrivateUploads,
  236.                             CheckDupes,
  237.                             GlobalDownload,
  238.                             RestrictUploads :Boolean;
  239.                             UploadCreditK,
  240.                             UploadCreditT :  Integer;
  241.                             MinSpace :       Longint;
  242.                             UploadArea :     Byte;
  243.                             DownloadHours :  Boolean;
  244.                             NoDownlAfter,
  245.  
  246.           ───────────────────────────────────────────────────────────────
  247.                                                                   Page: 4
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.                       RemoteAccess File Manager version 1.11
  255.           ───────────────────────────────────────────────────────────────
  256.  
  257.  
  258.                             NoDownlbefore :  Integer;
  259.                             ConvertArch :    String[3];
  260.                             ConvertDir,
  261.                             Commentpath :    String[50];
  262.                             LogOff,
  263.                             CheckVirus,
  264.                             SearchArch,
  265.                             ShowArch,
  266.                             ShowLong,
  267.                             ShowCounter,
  268.                             ShowDate,
  269.                             ShowKb,
  270.                             ShowNew :        Boolean;
  271.                             TextMissing :    String[30];
  272.                             DateFormat :     Byte;
  273.                             VirusPath,
  274.                             LogPath :        String[50];
  275.                             Efficiency :     Byte;
  276.                             FreeKb,
  277.                             FreeFiles :      Integer;
  278.                             TextAdopt :      String[210];
  279.                             SfxReArch,
  280.                             UseEms,
  281.                             Swapping :       Boolean;
  282.                             ListMethod :     Byte;
  283.                             DaysInActive,
  284.                             DaysToKill :     Integer;
  285.                             MoveInActive :   Boolean;
  286.                             InActiveArea :   Byte;
  287.                             KillInActive,
  288.                             ExtAscii,
  289.                             AskDays :        Boolean;
  290.                             ArchArea :       Byte;
  291.                             UpdateFilesBbs : Boolean;
  292.                             ChatReceiveCol,
  293.                             ChatSendCol,
  294.                             InverseFore,
  295.                             InverseBack :    Byte;
  296.                             ActionDup,
  297.                             ActionArch,
  298.                             MoveDupTo,
  299.                             MoveArchTo :     Byte;
  300.                             StampArch :      Boolean;
  301.                             Reserved :       Byte;
  302.                             end;
  303.  
  304.  
  305.           I  think that  most fields are selfexplaining,  or else you can
  306.           easily  find out what they mean  by looking at RafmEdit. If you
  307.  
  308.           ───────────────────────────────────────────────────────────────
  309.                                                                   Page: 5
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.                       RemoteAccess File Manager version 1.11
  317.           ───────────────────────────────────────────────────────────────
  318.  
  319.  
  320.           have diffulties with a field, just send me a message!
  321.  
  322.  
  323.           ╒═════════════════════════════════════════════════════════════╕
  324.           │░░░ ALLCONF.DAT ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
  325.           ╘═════════════════════════════════════════════════════════════╛
  326.  
  327.           Last but not least, AllConf.Dat containing the  information for
  328.           RafmAll.  AllConf.Dat is  a file  with a  fixed length  of 4160
  329.           bytes, containing 10 records.
  330.  
  331.           Type
  332.  
  333.           AllConfRecord =   Record
  334.                             Areas :          Array[1..200] of Boolean;
  335.                             AllName,
  336.                             NewName,
  337.                             Header,
  338.                             Trailer :        String[50];
  339.                             DaysInClude :    Integer;
  340.                             SepChar :        Char;
  341.                             ShowComm,
  342.                             ExtAscii,
  343.                             ShowXfer :       Boolean;
  344.                             Baud :           Array[1..3] of Word;
  345.                             End;
  346.  
  347.           Areas :           Each area corresponds with a boolean  in this
  348.                             array. If TRUE, the area has to be placed  in
  349.                             the current listing.
  350.           AllName :         Full path to the allfiles-listing.
  351.           NewName :         Full path to the newfiles-listing.
  352.           Header :          Full path to the  ASCII-file which has to  be
  353.                             placed at the beginning of the listings.
  354.           Trailer :         Like  header, but  placed at  the end  of the
  355.                             listings.
  356.           DaysInclude :     Determines  which  files are  placed  in  the
  357.                             newfiles-listing also.
  358.           SepChar :         The character to use between each filename.
  359.           ShowComm :        If  TRUE,  long comments  are written  to the
  360.                             listings.
  361.           ExtAscii :        If  TRUE, RafmAll is  allowed to use extended
  362.                             ASCII (>127).
  363.           ShowXfer :        If  TRUE,  RafmAll will  place  the estimated
  364.                             time to download the file in the listings.
  365.           Baud :            Determines  the  baudrates to  be  used  when
  366.                             calculating  the  estimated time  to download
  367.                             the file.
  368.  
  369.  
  370.           ───────────────────────────────────────────────────────────────
  371.                                                                   Page: 6
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.                       RemoteAccess File Manager version 1.11
  379.           ───────────────────────────────────────────────────────────────
  380.  
  381.  
  382.           ╒═════════════════════════════════════════════════════════════╕
  383.           │░░░ Notes about locking and access-modes ░░░░░░░░░░░░░░░░░░░░│
  384.           ╘═════════════════════════════════════════════════════════════╛
  385.  
  386.           During  run-time, Rafm  opens the  configuration-files in Read-
  387.           Only,  Deny-none  mode  (64)  and closes  them  directly  after
  388.           reading.  RafmFile.Dat  and  RafmIdx.Dat  are opened  in  Read-
  389.           Write, Deny-none mode (66). If you  want your program to run on
  390.           a  multi-line system,  you should  open the  files in  the same
  391.           mode,  or use  Write-only, Deny-none  mode (65).  Configuration
  392.           files may be changed  during run-time. Rafm will notice it  and
  393.           re-read the  file as soon  as a new  menu has  to be read  from
  394.           disk.
  395.  
  396.           Be  sure  to   lock  the   database  and  index  whenever   you
  397.           write/update  records or  else the  database could  be trashed.
  398.           First, lock the record  in RafmFile.Dat, then  lock the  record
  399.           in  RafmIdx.Dat.  After both  records  are  locked, write  your
  400.           record and unlock immediately. 
  401.  
  402.           ╒═════════════════════════════════════════════════════════════╕
  403.           │░░░ Final ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
  404.           ╘═════════════════════════════════════════════════════════════╛
  405.  
  406.           If you  have any trouble with this document,  just let me know!
  407.           Also,  I would  appreciate it  if you  send me  a copy  of your
  408.           utility (maybe I can use it myself :-)).
  409.  
  410.           Don't  forget:  these structures  will  change,  probably  with
  411.           every  new version of Rafm. I will try  to make each version of
  412.           Rafm backwards-compatible, but I can't promise anything.
  413.  
  414.  
  415.                                ---=== The End ===---
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.           ───────────────────────────────────────────────────────────────
  433.                                                                   Page: 7
  434.  
  435.